<template>
  <div class="c-item-top">
    <avatar :size="50" :user="comment.author"></avatar>
    <div class="text-right">
      <div class="username">{{ comment.author.nickname }}</div>
      <div class="c-about">
        <span style="margin-right:10px" v-if="comment.type==0">{{ comment.floor }}楼</span>
        <span class="time">{{ comment.createAt | dateFormat }}</span>
      </div>
    </div>
  </div>
</template>

<script>
import comment from "@/store/comment";

export default {
  props: ["comment"],
  name: "CommentItemTop",
};
</script>

<style scoped lang="less">
.c-item-top {
  display: flex;
   
  .avatar {
    margin-right: 20px;
  }
  .c-about {
    color: var(--text-regular);
    margin-top: 4px;
    font-size: 12px;
    
  }
}
</style>